import request from '/@/utils/request';

export function getUserList(query: Object) {
    return request({
        url: '/api/v1/system/users',
        method: 'get',
        params: query
    })
}

export function getUser(query: Object) {
    return request({
        url: '/api/v1/system/user/detail',
        method: 'get',
        params: query
    })
}

export function addUser(data: object) {
    return request({
        url: '/api/v1/system/user/add',
        method: 'post',
        data: data
    })
}


export function updateUser(data: object) {
    return request({
        url: '/api/v1/system/user/update',
        method: 'put',
        data: data
    })
}

export function deleteUser(id: number) {
    return request({
        url: '/api/v1/system/user/delete',
        method: 'delete',
        data: {id: id}
    })
}

export function resetUserPwd(data: object) {
    return request({
        url: '/api/v1/system/user/psd/reset',
        method: 'put',
        data: data
    })
}

export function changeUserStatus(data: object) {
    return request({
        url: '/api/v1/system/user/status/change',
        method: 'put',
        data: data
    })
}



